import { IRoute } from 'umi-types';

export default [
  {
    path: '/',
    name: '首页',
    component: '../authorization',
    routes: [
      {
        path: '/',
        redirect: '/user/login'
      },
      {
        title: '登录',
        path: '/user/login',
        component: './login'
      },
      {
        path: '/home',
        component: '../layouts',
        routes: [
          {
            path: '/home',
            hiddenMenu: true,
            redirect: '/home/article',
          },
          {
            title: '文章管理',
            icon: 'FormOutlined',
            path: '/home/article',
            component: './article',
          },
          {
            title: '币种管理',
            icon: 'TransactionOutlined',
            path: '/home/currency',
            component: './currency',
          },
          {
            title: '指标类型管理',
            icon: 'AreaChartOutlined',
            path: '/home/targetType',
            component: './targetType',
          },
          {
            title: '指标管理',
            icon: 'FundOutlined',
            path: '/home/target',
            component: './target',
          },
          {
            title: '订单管理',
            icon: 'PieChartOutlined',
            path: '/home/order',
            component: './order',
          },
          {
            title: '推荐奖励配置',
            icon: 'SnippetsOutlined',
            path: '/home/rewards',
            component: './rewards',
          },
          {
            title: '套餐管理',
            icon: 'ContainerOutlined',
            path: '/home/packages',
            component: './packages',
          },
          {
            title: '服务协议配置',
            icon: 'ProfileOutlined',
            path: '/home/serviceAgreement',
            component: './serviceAgreement',
          },
          {
            title: '购买协议配置',
            icon: 'ProfileOutlined',
            path: '/home/buyAgreement',
            component: './buyAgreement',
          }
        ],
      },
    ],
  },
] as IRoute[];
